<?
require_once ($DOCUMENT_ROOT . '/includes/functions.php');

db_connect();

$select_query = "SELECT id, authorID FROM vote";
$result = mysql_query($select_query);

$i = 1;

while ($line = mysql_fetch_row ($result))
{
	echo $i . "<br />\n";
	$update_query = sprintf ("UPDATE vote SET id = '%s', review_id = '%s' WHERE id = '%s' AND authorID = '%s'", $i++, $line[0], $line[0], $line[1]);
	mysql_query($update_query);
}
?>